<template>
  <view class="bgc-white p10 br4 mt12" style="display: flex" @click="goDetail">
    <i v-if="isJubei" class="iconfont mr8 fs24 tc-theme" style="flex-shrink: 0">&#xe6a0;</i>
    <i v-else class="iconfont mr8 fs24" style="flex-shrink: 0; color: rgba(109, 114, 120, 1)">&#xe6a0;</i>
    <view style="flex: 1">
      <view class="flex-center-between">
        <view class="flex-center">
          <text class="mr8">{{ target.institutionTypeName }}</text>
          <view v-if="!isJubei" class="tc-white fs12 br4 ph4 bgc-warn">未具备</view>
        </view>
        <view>{{ formatFullDate(target.gmtCreate) }}</view>
      </view>
      <view class="mt8 fs12">{{ target.institutionTypeIntroduce }}</view>
      <view class="ta-right mt8">
        <text v-if="isJubei" class="pv4 ph8 bgc-theme tc-white br4">查看详情</text>
        <text v-else class="pv4 ph8 tc-white br4" style="background: rgba(109, 114, 120, 1)">查看详情</text>
      </view>
    </view>
  </view>
</template>
<script>
import { formatFullDate } from "@/utils/tools";
export default {
  name: "",
  components: {},
  mixins: [],
  props: {
    target: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {};
  },
  computed: {
    isJubei() {
      return this.target.institutionVOList && this.target.institutionVOList.length > 0;
    }
  },
  watch: {},
  created() {},
  mounted() {},
  methods: {
    formatFullDate,
    goDetail() {
      if (this.isJubei) {
        uni.setStorageSync("tempZhidu", JSON.stringify(this.target.institutionVOList));
        uni.navigateTo({
          url: "/pages/list/zhiduList"
        });
      }
    }
  }
};
</script>
<style lang="scss"></style>
